﻿package com.devilcat.ui {
	
	import flash.display.MovieClip;
	import com.devilcat.dt.Gamedt;
	import com.devilcat.ui.PokemonInfor;
	import com.devilcat.dt.Pokemondt;
	
	public class PokemonListui extends MovieClip {
		
		
		public function PokemonListui() {
			// constructor code
		}
		public function render(){
			if(Gamedt.Player.pokemonList.length<1) return;
			var pkmif:PokemonInfor;
			var i:int
			while (this.numChildren > 0){
				this.removeChildAt(0);
			}
			for (i=0; i<Gamedt.Player.pokemonList.length; i++)
			{
				pkmif = new PokemonInfor(Gamedt.Player.pokemonList[i]);
				pkmif.y = 24 * i;
				//pokemon.RemoveAllEvent();
				pkmif.AddEventSwitchPokemon();
				this.addChild(pkmif);
			}
		}
	}
	
}
